package com.github.base.dto.dept;

import com.github.base.validated.Add;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;


/**
 * 机构添加Dto
 *
 * @author zhouwentong
 * @version v1.0
 * @since v1.0
 * Create by zhouwentong 2021-01-28
 */

@Data
public class DeptAddDTO {

    @NotNull(message = "父级id不能为空", groups = Add.class)
    @Schema(description = "父级机构id", requiredMode = Schema.RequiredMode.REQUIRED, example = "0")
    private Long parentId;

    @NotBlank(message = "机构名称不能为空")
    @Schema(description = "机构名称", requiredMode = Schema.RequiredMode.REQUIRED)
    private String deptName;

    @NotNull(message = "状态不能为空", groups = Add.class)
    @Schema(description = "状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "0")
    private Integer usable;

    @Schema(description = "机构描述", requiredMode = Schema.RequiredMode.REQUIRED)
    private String deptDesc;

    @NotNull(message = "层级不能为空", groups = Add.class)
    @Schema(description = "层级/深度", requiredMode = Schema.RequiredMode.REQUIRED, example = "0")
    private Integer parentDeptDeep ;

}
